home *** CD-ROM | disk | FTP | other *** search
- Path: news.luc.edu!user
- From: VArase@varase.it.luc.edu (Verne Arase)
- Newsgroups: comp.lang.c
- Subject: Re: Borland C's tmpnam()
- Date: Mon, 01 Apr 1996 16:48:44 -0600
- Organization: LUMC
- Message-ID: <AD85B96C9668FEE74@mcdiala11.it.luc.edu>
- References: <AD75E5DC9668E2A52@mcdiala13.it.luc.edu> <Pine.A32.3.91.960322134158.23347A-100000@red.weeg.uiowa.edu> <AD78E5E796681EC58@mcdialb10.it.luc.edu> <827626790snz@genesis.demon.co.uk> <AD7CDFD39668AABD2@mcdiala01.it.luc.edu> <828276946snz@genesis.demon.co.uk> <AD84A73496681719A2@mcdiala03.it.luc.edu> <andrewrDp62z2.uw@netcom.com>
- NNTP-Posting-Host: 147.126.240.111
-
- In article <andrewrDp62z2.uw@netcom.com>,
- andrewr@netcom.com (Andrew Reddig) wrote:
-
- >So, Borland could return an 8.3 filename, "C:\TEMP\BORLAND.001", or
- >whatever as long as you can open the file and not collide with an
- >existing file. What you get by looking at the filename is undefined.
-
- Actually, all it returns is "tmp<n>.$$$", where <n> is 1:2^16-1.
-
- >If the standard is silent on where the temporary file is located, a
- >conforming program couldn't change directories and assume that the file
- is
- >put in that directory anyway; a conforming implementation could
- >automagically put all temporary files in /tmp.
-
- If all you wanted was some temporary scratch space, that'd be fine. (Though
- often you may want to place your scratch file in another directory or on
- another volume with different access privledge or to avoid head
- contention).
-
- The problem is that if you want to do the old-master, new-master,
- update-file update and swap, you need the ability to define a new file in
- your target file directory without running into another file already there.
-
- ---
- The above are my own opinions, and not those of my employer.
-